package unit;

public class Quaternion {
    private final String type;
    private final String one;
    private final String two;
    private final String three;

    public Quaternion(String type) {
        this.type = type;
        this.one = "";
        this.two = "";
        this.three = "";
    }

    public Quaternion(String type, String one) {
        this.type = type;
        this.one = one;
        this.two = "";
        this.three = "";
    }

    public Quaternion(String type, String one, String two) {
        this.type = type;
        this.one = one;
        this.two = two;
        this.three = "";
    }

    public Quaternion(String type, String one, String two, String three) {
        this.type = type;
        this.one = one;
        this.two = two;
        this.three = three;
    }

    public String getType() {
        return type;
    }

    public String getOne() {
        return one;
    }

    public String getTwo() {
        return two;
    }

    public String getThree() {
        return three;
    }

    public String getPrint() {
        if (two.length() == 0) {
            return type + " " + one + "\n";
        } else if (three.length() == 0) {
            return type + " " + one + " " + two + "\n";
        } else {
            return type + " " + one + " " + two + " " + three + "\n";
        }
    }
}
